<?php
/**
 * This file defines the {@see \BF\Converter\IHtmlToX} interface.
 *
 * @author     Kado <ulfikado@gmail.com>
 * @category   Beluga PHP5.3+ Framework
 * @package    BF\Core
 * @since      2015-01-17 14:29
 * @subpackage Converter
 * @version    0.1
 */

namespace BF\Converter
{

   /**
    * Each HTML to ?? Converter must implement this interface
    *
    * @since v0.1
    */
   interface IHtmlToX
   {

      /**
       * Loads source HTML into memory, either from $source string or a file.
       *
       * @param string  $source   HTML content (or file path, if $fromFile is TRUE)
       * @param boolean $fromFile Indicates $source is a file path, to pull content from
       */
      public function setHTML( $source, $fromFile = false );

      /**
       * Returns the result, converted from HTML.
       *
       * @return string
       */
      public function getResult();

      /**
       * Prints the result, converted from HTML, to STDOUT.
       */
      public function printResult();

      /**
       * Sets the allowed HTML elements to pass through to the resulting text.
       *
       * Elements should be in the form "&lt;p&gt;&lt;spanp&gt;", or comma separated names "p, span" or a array
       * like array('&lt;p&gt;', '&lt;span&gt;') or array( 'p', 'span' ), with no corresponding closing tag.
       *
       * @param string|array $allowedElements
       */
      public function setAllowedElements( $allowedElements = array() );

   }

}


